<html>
	<head>
		<title>Krusty Burguer</title>
		<link href="elemento(2).css" type="text/css" rel="stylesheet">
	</head>
    
	<body>
		<div id="cabecera">
			<h1>KRUSTY BURGUER</h1>
			<img id="logo" width='10%' height='10%' src='logo.gif'>
		</div>
	
		<div id="fecha">
			<b>
				<script type="text/javascript">
				/*Reloj de la pagina*/
				function startTime(){
				today=new Date();
				h=today.getHours();
				m=today.getMinutes();
				s=today.getSeconds();
				m=checkTime(m);
				s=checkTime(s);
				document.getElementById('reloj').innerHTML=h+":"+m+":"+s;
				t=setTimeout('startTime()',500);}
				function checkTime(i)
				{if (i<10) {i="0" + i;}return i;}
				window.onload=function(){startTime();}
				</script>

		<div id="reloj" style="font-size:20px;"></div>
			</b> 
		</div>

    
		 <div id="menu">
			<ul>
				<b>
					<li><a href='index.html'>Inicio</a></li>
					<li><a href='ipol_product.php'>Producto</a></li>
					
				</b>
			</ul>
		</div>
		
		<div id="menu2">
			<h4>Indice</h4>
			<div >
			 
				
				<li class="b"><a href='ipol_product.php'>Producto</a></li>
				
			</div>
		</div>
		
    <div id="centroprincipal">
    <?php
	  
		$link = mysql_connect('localhost', "root")or die('No se pudo conectar: ' . mysql_error());
		mysql_select_db('proyecto') or die('No se pudo seleccionar la base de datos');


		$query = 'SELECT * FROM producto';
		$result = mysql_query($query) or die('Consulta fallida: ' . mysql_error());


		echo "<table>\n";
		while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
			echo "<tr>";
			foreach ($line as $col_value) {
				echo "<td>$col_value</td>";
			}
			echo "</tr>";
		}
		echo "</table>\n";
		mysql_free_result($result);

		mysql_close($link);
	
	?>
    </div>   
        
    
	<div id="pie">
		
			 <p>
				<b>Producto registrado por la empresa moe s family.</b>
			</p>
			  
			<p>
		<script type="text/javascript">
			
			var date = new Date();
			var d  = date.getDate();
			var day = (d < 10) ? '0' + d : d;
			var m = date.getMonth() + 1;
			var month = (m < 10) ? '0' + m : m;
			var yy = date.getYear();
			var year = (yy < 1000) ? yy + 1900 : yy;
			document.write(day + "/" + month + "/" + year);
		
		</script>
			 </p>
			 
	</div>
	</body>
</html>